import type { Directive } from 'vue'
import { App as VueApp } from 'vue' // 导入 Vue 的 App 类型

import move from './move/index' // 确保导入路径正确

const directives: any = {
     move,
}

// 对外暴露插件对象
export default {
     // 务必叫做 install 方法
     install(app: VueApp) {
          // 批量注册 directives 中的自定义指令
          for (const key in directives) {
               const directiveName = key
                    .replace('./directives/', '')
                    .replace('.ts', '')
               const directive = directives[key] as Directive
               app.directive(directiveName, directive)
          }
     },
}
